package caiwei.android.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import caiwei.android.R;
import caiwei.android.activity.base.ActivityGridItemBase;

/**
 * 基础知识Activity，呈现基础知识列表
 * 
 * @author caiwei
 * @date2012-3-7
 * @version 1.0
 */
public class ActivityGridBase extends ActivityGridItemBase
{

	@Override
	protected String[] initVariable()
	{
		return getResources().getStringArray(R.array.GridBaseListView);
	}

	@Override
	protected void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		setTopBarTitle(getResources().getStringArray(R.array.MainBodyItemText)[0]);
		removeBottomBox();
		mListView.setOnItemClickListener(new OnItemClickListener()
		{

			@Override
			public void onItemClick(AdapterView<?> parent, View view,
					int position, long id)
			{
				switch (position)
				{
				case 0:
					openActivity(ActivityGridBaseArchitecture.class);
					break;
				case 1:
					openActivityAnim(ActivityGridBaseActivityFirst.class);
					break;
				case 2:
					openActivityAnim(ActivityServiceDemo.class);
					break;
				case 3:

					break;
				case 4:

					break;
				case 5:

					break;

				default:
					break;
				}
			}
		});
	}

}
